package com.yxinsur.imc.business.events.publisher;

import com.yxinsur.imc.business.domain.ImcBroker;
import com.yxinsur.imc.business.domain.ImcOrder;
import com.yxinsur.imc.business.events.event.BrokerCreateEvent;
import com.yxinsur.imc.business.events.event.OrderCreateEvent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

/**
 * 保单录入事件发布类
 * @author imc
 *
 */
@Component
public class BrokerCreateEventPublisher {

    @Autowired
    private ApplicationContext applicationContext;

    public void pushlish(String msg, ImcBroker broker){
        applicationContext.publishEvent(new BrokerCreateEvent(this, msg,broker));
    }

}
